import request from '@/utils/request'
// 获取名单列表
const getUserList = (params) => (
  request.get('/getuserlist', { params })
)
// 删除当前名单
const deleteUser = (params) => (
  request.delete('/delentUser', { params })
)
// 修改用户信息
const changeUser = (params) => (
  request.post('/changeUser', { params })
)
// 添加角色
const userAdd = (params) => (
  request.put('/userAdd', { params })
)
// 获取所有商品
const getGoods = (params) => (
  request.get('/goodList', { params })
)
// 删除商品
const deleteGood = (params) => (
  request.delete('/deleteGood', { params })
)
// 获取全部的商品分类
const goodCate = (params) => (
  request.get('/goodCate', { params })
)
// 增加商品
const addGood = (params) => (
  request.put('/addGood', { params })
)
// 更新商品
const updataGood = (params) => (
  request.post('/updataGood', { params })
)
// 分类列表删除
const deleteCate = (params) => (
  request.delete('/deleteCate', { params })
)
// 新增商品分类
const cateAdd = (params) => (
  request.put('/cateAdd', { params })
)
// 更改商品分类
const cateChange = (params) => (
  request.post('/changeCate', { params })
)
// 获取全部订单
const orderList = (params) => (
  request.get('/orderList', { params })
)
// 修改收货地址
const addChange = (params) => (
  request.post('/addChange', { params })
)
// 登录接口
const login = (params) => (
  request.post('/login', { params })
)
// 获取合肥市地图
const hfMap = () => (
  request.get('https://geo.datav.aliyun.com/areas_v3/bound/340100_full.json')
)
// 以管理员身份登录
const getAuthority = (params) => (
  request.post('/getAuthority', { params })
)
// 以普通员工身份登录
const getCommon = (params) => (
  request.post('/getCommon', { params })
)
// 获取全部员工
const getStaff = (params) => (
  request.get('/getStaff', { params })
)
// 修改员工
const staffChange = (params) => (
  request.post('/staffChange', { params })
)
// 删除员工
const deleteStaff = (params) => (
  request.delete('/deleteStaff', { params })
)
// 获取表单数据
const getFrom = (params) => (
  request.get('/getFrom', { params })
)
export {
  getUserList,
  deleteUser,
  changeUser,
  userAdd,
  getGoods,
  deleteGood,
  goodCate,
  addGood,
  updataGood,
  deleteCate,
  cateAdd,
  cateChange,
  orderList,
  addChange,
  login,
  hfMap,
  getAuthority,
  getCommon,
  getStaff,
  staffChange,
  deleteStaff,
  getFrom
}
